home *** CD-ROM | disk | FTP | other *** search
/ Click Press Kit / Click Press Kit.iso / pc / main.dxr / Internal_24_Notes Parent.ls < prev    next >
Encoding:
Text File  |  2006-05-31  |  5.9 KB  |  148 lines

  1. property pSpriteNum, pProductionActive, pCastActive, pCreditsActive, pFilmmakerActive, pProductionCastNameSpanish, pCreditsCastNameSpanish, pProductionCastName, pCastCastName, pCreditsCastName, pFilmmakerCastName, pProductionCastNameTemp, pCastCastNameTemp, pCreditsCastNameTemp, pFilmmakerCastNameTemp, pProductionFileNameDOCenglish, pProductionFileNamePDFenglish, pProductionFileNameDOCspanish, pProductionFileNamePDFspanish, pProductionFileNameTXT, pCastFileNameDOC, pCastFileNamePDF, pCastFileNameTXT, pCreditsFileNameDOCenglish, pCreditsFileNamePDFenglish, pCreditsFileNameDOCspanish, pCreditsFileNamePDFspanish, pCreditsFileNameTXT, pFilmmakerFileNameDOC, pFilmmakerFileNamePDF, pFilmmakerFileNameTXT, pProductionSelectedSpanish, pCreditsSelectedSpanish, pProductionSelected, pCastSelected, pCreditsSelected, pFilmmakerSelected, pProductionPrinted, pCastPrinted, pCreditsPrinted, pFilmmakerPrinted, pDownloadStatus, pSide, pVertLoc, pHorzStartLoc, pHorzFinishLoc, pTabStatus, pTabSprite, pSelectedStatus
  2. global gMaster, gNotes, gSound
  3.  
  4. on new me, vSpriteNum, vProdActive, vCastActive, vCreditsActive, vFilmActive, vProdName, vCastName, vCreditsName, vFilmName, vProdFileDOCenglish, vProdFileDOCspanish, vProdFilePDFenglish, vProdFilePDFspanish, vCreditsFileDOCenglish, vCreditsFileDOCspanish, vCreditsFilePDFenglish, vCreditsFilePDFspanish, vDownload, vSide, vVertLoc, vHorzStartLoc, vHorzFinishLoc, vTabSprite
  5.   pSpriteNum = vSpriteNum
  6.   pProductionActive = vProdActive
  7.   pCastActive = vCastActive
  8.   pCreditsActive = vCreditsActive
  9.   pFilmmakerActive = vFilmActive
  10.   pProductionCastName = vProdName
  11.   pCastCastName = vCastName
  12.   pCreditsCastName = vCreditsName
  13.   pFilmmakerCastName = vFilmName
  14.   pProductionCastNameTemp = EMPTY
  15.   pCastCastNameTemp = EMPTY
  16.   pCreditsCastNameTemp = EMPTY
  17.   pFilmmakerCastNameTemp = EMPTY
  18.   pProductionFileNameDOCenglish = vProdFileDOCenglish
  19.   pProductionFileNamePDFenglish = vProdFilePDFenglish
  20.   pProductionFileNameDOCspanish = vProdFileDOCspanish
  21.   pProductionFileNamePDFspanish = vProdFilePDFspanish
  22.   pCreditsFileNameDOCenglish = vCreditsFileDOCenglish
  23.   pCreditsFileNamePDFenglish = vCreditsFilePDFenglish
  24.   pCreditsFileNameDOCspanish = vCreditsFileDOCspanish
  25.   pCreditsFileNamePDFspanish = vCreditsFilePDFspanish
  26.   pSide = vSide
  27.   pVertLoc = vVertLoc
  28.   pHorzStartLoc = vHorzStartLoc
  29.   pHorzFinishLoc = vHorzFinishLoc
  30.   pDownloadStatus = vDownload
  31.   pProductionSelectedSpanish = "no"
  32.   pCreditsSelectedSpanish = "no"
  33.   pProductionSelected = "no"
  34.   pCastSelected = "no"
  35.   pCreditsSelected = "no"
  36.   pFilmmakerSelected = "no"
  37.   pProductionPrinted = "no"
  38.   pCastPrinted = "no"
  39.   pCreditsPrinted = "no"
  40.   pFilmmakerPrinted = "no"
  41.   pTabStatus = "closed"
  42.   pTabSprite = vTabSprite
  43.   pSelectedStatus = "word"
  44.   return me
  45. end
  46.  
  47. on mSwitchNames me
  48.   pProductionCastName = pProductionCastNameTemp
  49.   pCreditsCastName = pCreditsCastNameTemp
  50. end
  51.  
  52. on PrintNotes me, vWhichOne
  53.   gSound.mPlayButtonClick()
  54.   case vWhichOne of
  55.     "production":
  56.       if gMaster.pLanguageMode = "english" then
  57.         newFile = the moviePath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol & gNotes.pProductionFileNamePDFenglish
  58.       else
  59.         newFile = the moviePath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol & gNotes.pProductionFileNamePDFspanish
  60.       end if
  61.     "cast":
  62.       if gMaster.pLanguageMode = "english" then
  63.         newFile = the moviePath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol & gNotes.pCastFileNamePDF
  64.       else
  65.         newFile = the moviePath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol & gNotes.pCastFileNamePDF
  66.       end if
  67.     "credits":
  68.       if gMaster.pLanguageMode = "english" then
  69.         newFile = the moviePath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol & gNotes.pCreditsFileNamePDFenglish
  70.       else
  71.         newFile = the moviePath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol & gNotes.pCreditsFileNamePDFspanish
  72.       end if
  73.     "filmmaker":
  74.       if gMaster.pLanguageMode = "english" then
  75.         newFile = the moviePath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol & gNotes.pFilmmakerFileNamePDF
  76.       else
  77.         newFile = the moviePath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol & gNotes.pFilmmakerFileNamePDF
  78.       end if
  79.     otherwise:
  80.       alert("you have a problem with PrintNotes")
  81.   end case
  82.   if baFileExists(newFile) = 1 then
  83.     vTemp = (the environment).productVersion
  84.     if the platform contains "Mac" then
  85.       case vTemp of
  86.         "8.5.1", "8.5":
  87.           vOpeningApp = baFindApp("ttxt")
  88.         "9.0":
  89.           vOpeningApp = baFindApp(".pdf")
  90.         otherwise:
  91.           vOpeningApp = baFindApp(".pdf")
  92.       end case
  93.     else
  94.       vOpeningApp = baFindApp(".pdf")
  95.     end if
  96.     if vOpeningApp <> EMPTY then
  97.       baOpenFile(newFile, "normal")
  98.     else
  99.       alert("can't find an application to open this PDF document")
  100.     end if
  101.   end if
  102. end
  103.  
  104. on mSlideTab me
  105.   case pSide of
  106.     "left":
  107.       if gNotes.pTabStatus = "opened" then
  108.         gNotes.pTabStatus = "closed"
  109.         gNotes.mCloseTab()
  110.       else
  111.         gNotes.pTabStatus = "opened"
  112.         gNotes.mOpenTab()
  113.       end if
  114.     "right":
  115.       if gNotes.pTabStatus = "opened" then
  116.         gNotes.pTabStatus = "closed"
  117.         gNotes.mCloseTab()
  118.       else
  119.         gNotes.pTabStatus = "opened"
  120.         gNotes.mOpenTab()
  121.       end if
  122.   end case
  123. end
  124.  
  125. on mOpenTab me
  126.   vTargetH = pHorzFinishLoc
  127.   vTargetV = pVertLoc
  128.   vDeltaH = vTargetH - sprite(pTabSprite).locH
  129.   vDeltaV = vTargetV - sprite(pTabSprite).locV
  130.   repeat with i = 1 to 15
  131.     comp = 15 - i
  132.     sprite(pTabSprite).locH = vTargetH - (comp * vDeltaH / 15)
  133.     updateStage()
  134.   end repeat
  135. end
  136.  
  137. on mCloseTab me
  138.   vTargetH = pHorzStartLoc
  139.   vTargetV = pVertLoc
  140.   vDeltaH = vTargetH - sprite(pTabSprite).locH
  141.   vDeltaV = vTargetV - sprite(pTabSprite).locV
  142.   repeat with i = 1 to 15
  143.     comp = 15 - i
  144.     sprite(pTabSprite).locH = vTargetH - (comp * vDeltaH / 15)
  145.     updateStage()
  146.   end repeat
  147. end
  148.